home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / minix / libsrc~1.z / libsrc~1 / stsetjmp.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1989-12-28  |  415 b   |  38 lines

  1. #
  2.     .globl    _setjmp
  3.     .globl    _longjmp
  4. #ifdef ACK
  5.         .text
  6.         .data
  7.         .bss
  8. #endif ACK
  9.  
  10.         .text
  11.         .even
  12. _setjmp:
  13.     movl    sp@(4),a0
  14.     movl    sp@,a0@
  15.     moveml    d2-d7/a2-a7,a0@(4)
  16.     clrl    d0
  17.     rts
  18.  
  19.         .text
  20.         .even
  21. _longjmp:
  22.     movl    sp@(4),a0
  23. #ifdef __GNUC__
  24. #ifndef __MSHORT__
  25.     movl    sp@(8),d0
  26. #else
  27.     movw    sp@(8),d0
  28. #endif
  29. #else
  30.     movw    sp@(8),d0
  31. #endif
  32.     bne    L1
  33.     movl    #1,d0        | may not be 0
  34. L1:
  35.     moveml    a0@(4),d2-d7/a2-a7
  36.     movl    a0@,sp@
  37.     rts
  38.